
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type OtherOrderRequest struct {

	Uid string `json:"uid" form:"uid"`

	Type string `json:"type" form:"type"`

	OrderId string `json:"order_id" form:"order_id"`

	MemberType string `json:"member_type" form:"member_type"`

	Code string `json:"code" form:"code"`

	PayType string `json:"pay_type" form:"pay_type"`

	Paid string `json:"paid" form:"paid"`

	PayPrice string `json:"pay_price" form:"pay_price"`

	MemberPrice string `json:"member_price" form:"member_price"`

	PayTime string `json:"pay_time" form:"pay_time"`

	TradeNo string `json:"trade_no" form:"trade_no"`

	ChannelType string `json:"channel_type" form:"channel_type"`

	IsFree string `json:"is_free" form:"is_free"`

	IsPermanent string `json:"is_permanent" form:"is_permanent"`

	OverdueTime string `json:"overdue_time" form:"overdue_time"`

	IsDel string `json:"is_del" form:"is_del"`

	VipDay string `json:"vip_day" form:"vip_day"`

	AddTime string `json:"add_time" form:"add_time"`

	Money string `json:"money" form:"money"`

}

func (r *OtherOrderRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *OtherOrderRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"uid": "required",

		"type": "required",

		"order_id": "required",

		"member_type": "required",

		"code": "required",

		"pay_type": "required",

		"paid": "required",

		"pay_price": "required",

		"member_price": "required",

		"pay_time": "required",

		"trade_no": "required",

		"channel_type": "required",

		"is_free": "required",

		"is_permanent": "required",

		"overdue_time": "required",

		"is_del": "required",

		"vip_day": "required",

		"add_time": "required",

		"money": "required",

	}
}

func (r *OtherOrderRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *OtherOrderRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *OtherOrderRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
